﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace XiDainChangAn.OA.IBLL
{
    public interface IBaseService<T> where T:class,new ()
    {
        T GetById(int id);

        IQueryable<T> GetEntitys(Expression<Func<T, bool>> whereLambd);

        IQueryable<T> GetPageEntitys<S>(int pageSize, int pageIndex, out int total, bool isAsc, Expression<Func<T, bool>> whereLambda, Expression<Func<T, S>> orderByLambda);

        bool Add(T entity);

        bool UpDate(T entity);

        bool Delete(T entity);
    }
}
